package com.yinhechuangji.application.hystrix;

import com.yinhechuangji.application.entity.UserBase;
import com.yinhechuangji.application.feign.UserFeignClient;
import org.apache.catalina.User;
import org.springframework.stereotype.Component;

/**
 * @Auther: yaodx
 * @Date: 2018/7/3 14:10
 * @Description:当UserFeignClient不可用或者出错时调用该类，防止为服务架构发生雪崩效应
 */
@Component
public class UserFeignClientHystrix implements UserFeignClient {

    @Override
    public UserBase test() {
        UserBase ub=new UserBase();
        ub.setNickName("****");
        System.err.println("Hystrix---开始");
        return ub;
    }
}
